package com.aggeek.springbootlearning.thread.study;

/**
 * author:liuao
 * description:
 * Date: create on 14:50 2017/12/12
 * modify by:
 */
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicReference;

public class TestA {
    AtomicReference<ThreadTest> l;


    public synchronized void printA() {
        System.out.println("a");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    public synchronized static  void prints(){
        System.out.println("静态方法");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    public synchronized static  void printsl(){
        System.out.println("静态方法a");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    public synchronized void printb() {
        System.out.println("b");
    }

}
